Optimal. Leaf size=285 \[ \frac{b \left (7 a^2 A b-4 a^3 B-12 a b^2 B+15 A b^3\right )}{4 a^3 d \left (a^2+b^2\right ) \sqrt{a+b \tan (c+d x)}}+\frac{\left (8 a^2 A+12 a b B-15 A b^2\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{4 a^{7/2} d}+\frac{(5 A b-4 a B) \cot (c+d x)}{4 a^2 d \sqrt{a+b \tan (c+d x)}}-\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d (a-i b)^{3/2}}-\frac{(A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d (a+i b)^{3/2}}-\frac{A \cot ^2(c+d x)}{2 a d \sqrt{a+b \tan (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 1.20969, antiderivative size = 285, normalized size of antiderivative = 1., number of steps used = 14, number of rules used = 8, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.242, Rules used = {3609, 3649, 3653, 3539, 3537, 63, 208, 3634} \[ \frac{b \left (7 a^2 A b-4 a^3 B-12 a b^2 B+15 A b^3\right )}{4 a^3 d \left (a^2+b^2\right ) \sqrt{a+b \tan (c+d x)}}+\frac{\left (8 a^2 A+12 a b B-15 A b^2\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{4 a^{7/2} d}+\frac{(5 A b-4 a B) \cot (c+d x)}{4 a^2 d \sqrt{a+b \tan (c+d x)}}-\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d (a-i b)^{3/2}}-\frac{(A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d (a+i b)^{3/2}}-\frac{A \cot ^2(c+d x)}{2 a d \sqrt{a+b \tan (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3609
Rule 3649
Rule 3653
Rule 3539
Rule 3537
Rule 63
Rule 208
Rule 3634
Rubi steps
\begin{align*} \int \frac{\cot ^3(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^{3/2}} \, dx &=-\frac{A \cot ^2(c+d x)}{2 a d \sqrt{a+b \tan (c+d x)}}-\frac{\int \frac{\cot ^2(c+d x) \left (\frac{1}{2} (5 A b-4 a B)+2 a A \tan (c+d x)+\frac{5}{2} A b \tan ^2(c+d x)\right )}{(a+b \tan (c+d x))^{3/2}} \, dx}{2 a}\\ &=\frac{(5 A b-4 a B) \cot (c+d x)}{4 a^2 d \sqrt{a+b \tan (c+d x)}}-\frac{A \cot ^2(c+d x)}{2 a d \sqrt{a+b \tan (c+d x)}}+\frac{\int \frac{\cot (c+d x) \left (\frac{1}{4} \left (-8 a^2 A+15 A b^2-12 a b B\right )-2 a^2 B \tan (c+d x)+\frac{3}{4} b (5 A b-4 a B) \tan ^2(c+d x)\right )}{(a+b \tan (c+d x))^{3/2}} \, dx}{2 a^2}\\ &=\frac{b \left (7 a^2 A b+15 A b^3-4 a^3 B-12 a b^2 B\right )}{4 a^3 \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{(5 A b-4 a B) \cot (c+d x)}{4 a^2 d \sqrt{a+b \tan (c+d x)}}-\frac{A \cot ^2(c+d x)}{2 a d \sqrt{a+b \tan (c+d x)}}+\frac{\int \frac{\cot (c+d x) \left (-\frac{1}{8} \left (a^2+b^2\right ) \left (8 a^2 A-15 A b^2+12 a b B\right )+a^3 (A b-a B) \tan (c+d x)+\frac{1}{8} b \left (7 a^2 A b+15 A b^3-4 a^3 B-12 a b^2 B\right ) \tan ^2(c+d x)\right )}{\sqrt{a+b \tan (c+d x)}} \, dx}{a^3 \left (a^2+b^2\right )}\\ &=\frac{b \left (7 a^2 A b+15 A b^3-4 a^3 B-12 a b^2 B\right )}{4 a^3 \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{(5 A b-4 a B) \cot (c+d x)}{4 a^2 d \sqrt{a+b \tan (c+d x)}}-\frac{A \cot ^2(c+d x)}{2 a d \sqrt{a+b \tan (c+d x)}}+\frac{\int \frac{a^3 (A b-a B)+a^3 (a A+b B) \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{a^3 \left (a^2+b^2\right )}-\frac{\left (8 a^2 A-15 A b^2+12 a b B\right ) \int \frac{\cot (c+d x) \left (1+\tan ^2(c+d x)\right )}{\sqrt{a+b \tan (c+d x)}} \, dx}{8 a^3}\\ &=\frac{b \left (7 a^2 A b+15 A b^3-4 a^3 B-12 a b^2 B\right )}{4 a^3 \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{(5 A b-4 a B) \cot (c+d x)}{4 a^2 d \sqrt{a+b \tan (c+d x)}}-\frac{A \cot ^2(c+d x)}{2 a d \sqrt{a+b \tan (c+d x)}}+\frac{(A-i B) \int \frac{1+i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{2 (i a+b)}+\frac{((i a+b) (A+i B)) \int \frac{1-i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{2 \left (a^2+b^2\right )}-\frac{\left (8 a^2 A-15 A b^2+12 a b B\right ) \operatorname{Subst}\left (\int \frac{1}{x \sqrt{a+b x}} \, dx,x,\tan (c+d x)\right )}{8 a^3 d}\\ &=\frac{b \left (7 a^2 A b+15 A b^3-4 a^3 B-12 a b^2 B\right )}{4 a^3 \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{(5 A b-4 a B) \cot (c+d x)}{4 a^2 d \sqrt{a+b \tan (c+d x)}}-\frac{A \cot ^2(c+d x)}{2 a d \sqrt{a+b \tan (c+d x)}}+\frac{(A-i B) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 (a-i b) d}+\frac{(A+i B) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 (a+i b) d}-\frac{\left (8 a^2 A-15 A b^2+12 a b B\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{a}{b}+\frac{x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{4 a^3 b d}\\ &=\frac{\left (8 a^2 A-15 A b^2+12 a b B\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{4 a^{7/2} d}+\frac{b \left (7 a^2 A b+15 A b^3-4 a^3 B-12 a b^2 B\right )}{4 a^3 \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{(5 A b-4 a B) \cot (c+d x)}{4 a^2 d \sqrt{a+b \tan (c+d x)}}-\frac{A \cot ^2(c+d x)}{2 a d \sqrt{a+b \tan (c+d x)}}-\frac{(i (A+i B)) \operatorname{Subst}\left (\int \frac{1}{-1+\frac{i a}{b}-\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{(a+i b) b d}+\frac{(i A+B) \operatorname{Subst}\left (\int \frac{1}{-1-\frac{i a}{b}+\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{(a-i b) b d}\\ &=\frac{\left (8 a^2 A-15 A b^2+12 a b B\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{4 a^{7/2} d}-\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{(a-i b)^{3/2} d}-\frac{(A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{(a+i b)^{3/2} d}+\frac{b \left (7 a^2 A b+15 A b^3-4 a^3 B-12 a b^2 B\right )}{4 a^3 \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{(5 A b-4 a B) \cot (c+d x)}{4 a^2 d \sqrt{a+b \tan (c+d x)}}-\frac{A \cot ^2(c+d x)}{2 a d \sqrt{a+b \tan (c+d x)}}\\ \end{align*}
Mathematica [A] time = 6.21701, size = 409, normalized size = 1.44 \[ -\frac{A \cot ^2(c+d x)}{2 a d \sqrt{a+b \tan (c+d x)}}-\frac{-\frac{(5 A b-4 a B) \cot (c+d x)}{2 a d \sqrt{a+b \tan (c+d x)}}-\frac{\frac{2 \left (\frac{1}{4} b^2 \left (-8 a^2 A-12 a b B+15 A b^2\right )-a \left (-2 a^2 b B-\frac{3}{4} a b (5 A b-4 a B)\right )\right )}{a d \left (a^2+b^2\right ) \sqrt{a+b \tan (c+d x)}}+\frac{2 \left (\frac{\left (a^2+b^2\right ) \left (8 a^2 A+12 a b B-15 A b^2\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{4 \sqrt{a} d}+\frac{i \sqrt{a-i b} \left (a^3 (A b-a B)-i a^3 (a A+b B)\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d (-a+i b)}-\frac{i \sqrt{a+i b} \left (a^3 (A b-a B)+i a^3 (a A+b B)\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d (-a-i b)}\right )}{a \left (a^2+b^2\right )}}{a}}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 3.467, size = 174418, normalized size = 612. \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \tan \left (d x + c\right ) + A\right )} \cot \left (d x + c\right )^{3}}{{\left (b \tan \left (d x + c\right ) + a\right )}^{\frac{3}{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]